﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WMM.Tapioca.Linkbase;

namespace WMM.Tapioca.Formula.Filters
{
    public abstract class MatchFilter : Filter
    {
        private string variable;

        /// <returns> Source variable. </returns>
        public string Variable
        {
            get { return variable; }
            set { variable = value; }
        }

        /// <summary>
        /// Constructor.
        /// </summary>
        public MatchFilter(Resource resource)
            : base(resource)
        {
            variable = (string)resource.ResourceXElement.Attribute("variable") ?? string.Empty;
        }
    }
}
